// ws_micro_shop/pages/virtual-card/list.js
const api = require('../../utils/api.js');
const app = getApp();

Page({
  data: {
    abnorData: {
      imgSrc: app.imgUrl + 'abnor-19.png',
      text: '暂无记录',
    },
    list: [],
  },

  onLoad(options) {
    let that = this;

    app.ws_micro_shoprequest({
      url: api.recharge.virtual_record,
      data: {},
      method: 'POST',
      success: function(res) {
        if (res.code === 0) {
          that.setData({
            list: res.data,
          });
        } else {
          wx.showModal({
            title: '提示',
            content: res.msg,
            showCancel: false,
          });
        }
      },
    });
  },
});
